
package com.ctshk.rpc.ship.request;

/**
 * Please modify this class to meet your needs
 * This class is not complete
 */

import com.ctshk.rpc.ship.thirdparty.zhujiang.CheckUser;
import com.ctshk.rpc.ship.thirdparty.zhujiang.CksServicesService;
import com.ctshk.rpc.ship.thirdparty.zhujiang.Exception_Exception;
import com.ctshk.rpc.ship.thirdparty.zhujiang.IcksServices;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;

import javax.xml.namespace.QName;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

/**
 * This class was generated by Apache CXF 3.4.2
 * 2021-03-23T14:36:55.090+08:00
 * Generated source version: 3.4.2
 */
public final class IcksServices_CksServicesPort_Client {

    private static final QName SERVICE_NAME = new QName("http://ws.service.gen.cks.com/", "CksServicesService");

    private IcksServices_CksServicesPort_Client() {
    }

    public static void main(String args[]) throws Exception {
        URL wsdlURL = CksServicesService.CKSSERVICESSERVICE_WSDL_LOCATION;
        if (args.length > 0 && args[0] != null && !"".equals(args[0])) {
            File wsdlFile = new File(args[0]);
            try {
                if (wsdlFile.exists()) {
                    wsdlURL = wsdlFile.toURI().toURL();
                } else {
                    wsdlURL = new URL(args[0]);
                }
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }
        }

        CksServicesService ss = new CksServicesService(wsdlURL);
        ss.getHandlerResolver();
        IcksServices port = ss.getCksServicesPort();
        System.out.println("Invoking getAirLine...");
        Document document = DocumentHelper.createDocument();
        //创建根节点
        Element root = document.addElement("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
        //添加子节点
        Element account = root.addElement("account");
        Element pwd = root.addElement("pwd");
        Element timestamp = root.addElement("timestamp");
        Element worksite = root.addElement("worksite");
        Element discountId = root.addElement("discount_id");
        //赋值
        account.addText("CTAPI01");
        pwd.addText("E5BEBEFE507CE4EB0759492424B217F0");
        timestamp.addText("202103221138");
        worksite.addText("CTAPI");
        discountId.addText("");
        String strXML = document.asXML();
        System.out.println(strXML);

        try {
            String _getAirLine__return = port.getVoyage("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                    "<TABLE VERSION=\"1.0\"> \n" +
                    "<ROW> \n" +
                    "<SAILDATE>2019-03-22</SAILDATE> \n" +
                    "<SAILDATERETURN>2019-03-23</SAILDATERETURN> \n" +
                    "<FROMPORTCODE>HKC</FROMPORTCODE> \n" +
                    "<TOPORTCODE>MAC</TOPORTCODE> \n" +
                    "<FROMPORTCODERETURN>MAC</FROMPORTCODERETURN> \n" +
                    "<TOPORTCODERETURN>HKM</TOPORTCODERETURN> \n" +
                    "<CURRENCYCODE>HKD</CURRENCYCODE> \n" +
                    "<ISROUNDTRIP>1</ISROUNDTRIP> \n" +
                    "<LANG>C</LANG> \n" +
                    "</ROW> \n" +
                    "</TABLE>");
            System.out.println("getAirLine.result=" + _getAirLine__return);

        } catch (Exception_Exception e) {
            System.out.println("Expected exception: Exception has occurred.");
            System.out.println(e.toString());
        }
        {
            System.out.println("Invoking setOpenTicketRelease...");
            String _setOpenTicketRelease_arg0 = "";
            try {
                String _setOpenTicketRelease__return = port.setOpenTicketRelease(_setOpenTicketRelease_arg0);
                System.out.println("setOpenTicketRelease.result=" + _setOpenTicketRelease__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking newPassenger...");
            String _newPassenger_newPassengerXml = "";
            try {
                String _newPassenger__return = port.newPassenger(_newPassenger_newPassengerXml);
                System.out.println("newPassenger.result=" + _newPassenger__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking gateIn...");
            String _gateIn_ticketXML = "";
            try {
                String _gateIn__return = port.gateIn(_gateIn_ticketXML);
                System.out.println("gateIn.result=" + _gateIn__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking gateInInfo...");
            String _gateInInfo_gateInfoXml = "";
            try {
                String _gateInInfo__return = port.gateInInfo(_gateInInfo_gateInfoXml);
                System.out.println("gateInInfo.result=" + _gateInInfo__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getCountry...");
            try {
                String _getCountry__return = port.getCountry();
                System.out.println("getCountry.result=" + _getCountry__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking updateGroupTicket...");
            String _updateGroupTicket_updateGroupTicketXml = "";
            try {
                String _updateGroupTicket__return = port.updateGroupTicket(_updateGroupTicket_updateGroupTicketXml);
                System.out.println("updateGroupTicket.result=" + _updateGroupTicket__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getShipMapList...");
            String _getShipMapList_shipMapXML = "";
            try {
                String _getShipMapList__return = port.getShipMapList(_getShipMapList_shipMapXML);
                System.out.println("getShipMapList.result=" + _getShipMapList__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchTicketStatus...");
            String _searchTicketStatus_ticketXML = "";
            try {
                String _searchTicketStatus__return = port.searchTicketStatus(_searchTicketStatus_ticketXML);
                System.out.println("searchTicketStatus.result=" + _searchTicketStatus__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking saveUser...");
            String _saveUser_userXml = "";
            try {
                String _saveUser__return = port.saveUser(_saveUser_userXml);
                System.out.println("saveUser.result=" + _saveUser__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getShippingLine...");
            try {
                String _getShippingLine__return = port.getShippingLine();
                System.out.println("getShippingLine.result=" + _getShippingLine__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchShkTicketByCode...");
            String _searchShkTicketByCode_ticketCodeXml = "";
            try {
                String _searchShkTicketByCode__return = port.searchShkTicketByCode(_searchShkTicketByCode_ticketCodeXml);
                System.out.println("searchShkTicketByCode.result=" + _searchShkTicketByCode__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking submitBooking...");
            String _submitBooking_ticketsInfoXML = "";
            try {
                String _submitBooking__return = port.submitBooking(_submitBooking_ticketsInfoXML);
                System.out.println("submitBooking.result=" + _submitBooking__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking testAuthentication...");
            try {
                port.testAuthentication();

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking changeTicketConfirm...");
            String _changeTicketConfirm_changeConfirmXML = "";
            try {
                String _changeTicketConfirm__return = port.changeTicketConfirm(_changeTicketConfirm_changeConfirmXML);
                System.out.println("changeTicketConfirm.result=" + _changeTicketConfirm__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking confirmBookingRn...");
            String _confirmBookingRn_confirmRnXml = "";
            try {
                String _confirmBookingRn__return = port.confirmBookingRn(_confirmBookingRn_confirmRnXml);
                System.out.println("confirmBookingRn.result=" + _confirmBookingRn__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking checkLuggagebyTag...");
            String _checkLuggagebyTag_checkXml = "";
            try {
                String _checkLuggagebyTag__return = port.checkLuggagebyTag(_checkLuggagebyTag_checkXml);
                System.out.println("checkLuggagebyTag.result=" + _checkLuggagebyTag__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchTicketCheckinStatus...");
            String _searchTicketCheckinStatus_searchTicketXml = "";
            try {
                String _searchTicketCheckinStatus__return = port.searchTicketCheckinStatus(_searchTicketCheckinStatus_searchTicketXml);
                System.out.println("searchTicketCheckinStatus.result=" + _searchTicketCheckinStatus__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking ticketOutByCode...");
            String _ticketOutByCode_ticketXML = "";
            try {
                String _ticketOutByCode__return = port.ticketOutByCode(_ticketOutByCode_ticketXML);
                System.out.println("ticketOutByCode.result=" + _ticketOutByCode__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking checkUser...");
            String _checkUser_loginXml = "";
            try {
                String _checkUser__return = port.checkUser(_checkUser_loginXml);
                System.out.println("checkUser.result=" + _checkUser__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getDiscountTypeSet...");
            String _getDiscountTypeSet_discounttypeSetXml = "";
            try {
                String _getDiscountTypeSet__return = port.getDiscountTypeSet(_getDiscountTypeSet_discounttypeSetXml);
                System.out.println("getDiscountTypeSet.result=" + _getDiscountTypeSet__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking checkPromotionCode...");
            String _checkPromotionCode_promotionXml = "";
            try {
                String _checkPromotionCode__return = port.checkPromotionCode(_checkPromotionCode_promotionXml);
                System.out.println("checkPromotionCode.result=" + _checkPromotionCode__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchUser...");
            String _searchUser_searchXml = "";
            try {
                String _searchUser__return = port.searchUser(_searchUser_searchXml);
                System.out.println("searchUser.result=" + _searchUser__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchVoyageForRealName...");
            String _searchVoyageForRealName_searchXml = "";
            try {
                String _searchVoyageForRealName__return = port.searchVoyageForRealName(_searchVoyageForRealName_searchXml);
                System.out.println("searchVoyageForRealName.result=" + _searchVoyageForRealName__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking changeTicketBooking...");
            String _changeTicketBooking_changeTicketsInfoXML = "";
            try {
                String _changeTicketBooking__return = port.changeTicketBooking(_changeTicketBooking_changeTicketsInfoXML);
                System.out.println("changeTicketBooking.result=" + _changeTicketBooking__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getShiptypeLayerRefInfo...");
            try {
                String _getShiptypeLayerRefInfo__return = port.getShiptypeLayerRefInfo();
                System.out.println("getShiptypeLayerRefInfo.result=" + _getShiptypeLayerRefInfo__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking submitBookingRn...");
            String _submitBookingRn_submitRnXml = "";
            try {
                String _submitBookingRn__return = port.submitBookingRn(_submitBookingRn_submitRnXml);
                System.out.println("submitBookingRn.result=" + _submitBookingRn__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchPickInfo...");
            String _searchPickInfo_realNameXml = "";
            try {
                String _searchPickInfo__return = port.searchPickInfo(_searchPickInfo_realNameXml);
                System.out.println("searchPickInfo.result=" + _searchPickInfo__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking updatePassenger...");
            String _updatePassenger_updatePassengerXml = "";
            try {
                String _updatePassenger__return = port.updatePassenger(_updatePassenger_updatePassengerXml);
                System.out.println("updatePassenger.result=" + _updatePassenger__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking checkEmail...");
            String _checkEmail_checkXml = "";
            try {
                String _checkEmail__return = port.checkEmail(_checkEmail_checkXml);
                System.out.println("checkEmail.result=" + _checkEmail__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchRefundTicket...");
            String _searchRefundTicket_ticketXML = "";
            try {
                String _searchRefundTicket__return = port.searchRefundTicket(_searchRefundTicket_ticketXML);
                System.out.println("searchRefundTicket.result=" + _searchRefundTicket__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking setAirPassenger...");
            String _setAirPassenger_airPassengerXml = "";
            try {
                String _setAirPassenger__return = port.setAirPassenger(_setAirPassenger_airPassengerXml);
                System.out.println("setAirPassenger.result=" + _setAirPassenger__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getVoyage...");
            String _getVoyage_filterXml = "";
            try {
                String _getVoyage__return = port.getVoyage(_getVoyage_filterXml);
                System.out.println("getVoyage.result=" + _getVoyage__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking updateUser...");
            String _updateUser_updateXml = "";
            try {
                String _updateUser__return = port.updateUser(_updateUser_updateXml);
                System.out.println("updateUser.result=" + _updateUser__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchPassenger...");
            String _searchPassenger_searchPassengerXml = "";
            try {
                String _searchPassenger__return = port.searchPassenger(_searchPassenger_searchPassengerXml);
                System.out.println("searchPassenger.result=" + _searchPassenger__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking releaseTicket...");
            String _releaseTicket_ticketXML = "";
            try {
                String _releaseTicket__return = port.releaseTicket(_releaseTicket_ticketXML);
                System.out.println("releaseTicket.result=" + _releaseTicket__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking deleteGroupTicket...");
            String _deleteGroupTicket_deleteGroupTicketXml = "";
            try {
                String _deleteGroupTicket__return = port.deleteGroupTicket(_deleteGroupTicket_deleteGroupTicketXml);
                System.out.println("deleteGroupTicket.result=" + _deleteGroupTicket__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking confirmBooking...");
            String _confirmBooking_confirmXML = "";
            try {
                String _confirmBooking__return = port.confirmBooking(_confirmBooking_confirmXML);
                System.out.println("confirmBooking.result=" + _confirmBooking__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking ticketOut...");
            String _ticketOut_ticketXML = "";
            try {
                String _ticketOut__return = port.ticketOut(_ticketOut_ticketXML);
                System.out.println("ticketOut.result=" + _ticketOut__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getMCT...");
            String _getMCT_mctXml = "";
            try {
                String _getMCT__return = port.getMCT(_getMCT_mctXml);
                System.out.println("getMCT.result=" + _getMCT__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking setOpenTicketReserve...");
            String _setOpenTicketReserve_arg0 = "";
            try {
                String _setOpenTicketReserve__return = port.setOpenTicketReserve(_setOpenTicketReserve_arg0);
                System.out.println("setOpenTicketReserve.result=" + _setOpenTicketReserve__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getTicketRecord...");
            String _getTicketRecord_getXml = "";
            try {
                String _getTicketRecord__return = port.getTicketRecord(_getTicketRecord_getXml);
                System.out.println("getTicketRecord.result=" + _getTicketRecord__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking insertOrUpdateTicketRemark...");
            String _insertOrUpdateTicketRemark_ticketRemarkXml = "";
            try {
                String _insertOrUpdateTicketRemark__return = port.insertOrUpdateTicketRemark(_insertOrUpdateTicketRemark_ticketRemarkXml);
                System.out.println("insertOrUpdateTicketRemark.result=" + _insertOrUpdateTicketRemark__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getNation...");
            try {
                String _getNation__return = port.getNation();
                System.out.println("getNation.result=" + _getNation__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking newGroupTicket...");
            String _newGroupTicket_newGroupTicketXml = "";
            try {
                String _newGroupTicket__return = port.newGroupTicket(_newGroupTicket_newGroupTicketXml);
                System.out.println("newGroupTicket.result=" + _newGroupTicket__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking gateInByRealName...");
            String _gateInByRealName_gateinXml = "";
            try {
                String _gateInByRealName__return = port.gateInByRealName(_gateInByRealName_gateinXml);
                System.out.println("gateInByRealName.result=" + _gateInByRealName__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking refundTicket...");
            String _refundTicket_ticketXML = "";
            try {
                String _refundTicket__return = port.refundTicket(_refundTicket_ticketXML);
                System.out.println("refundTicket.result=" + _refundTicket__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking getOpenTicket...");
            String _getOpenTicket_arg0 = "";
            try {
                String _getOpenTicket__return = port.getOpenTicket(_getOpenTicket_arg0);
                System.out.println("getOpenTicket.result=" + _getOpenTicket__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking heartBeat...");
            String _heartBeat_heartBeatXml = "";
            try {
                String _heartBeat__return = port.heartBeat(_heartBeat_heartBeatXml);
                System.out.println("heartBeat.result=" + _heartBeat__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchLuggage...");
            String _searchLuggage_searchXml = "";
            try {
                String _searchLuggage__return = port.searchLuggage(_searchLuggage_searchXml);
                System.out.println("searchLuggage.result=" + _searchLuggage__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }
        {
            System.out.println("Invoking searchGroupTicket...");
            String _searchGroupTicket_searchGroupTicketXml = "";
            try {
                String _searchGroupTicket__return = port.searchGroupTicket(_searchGroupTicket_searchGroupTicketXml);
                System.out.println("searchGroupTicket.result=" + _searchGroupTicket__return);

            } catch (Exception_Exception e) {
                System.out.println("Expected exception: Exception has occurred.");
                System.out.println(e.toString());
            }

        }

        System.exit(0);
    }

}
